package com.laiketui.order.api.feign;

import com.laiketui.core.exception.LaiKeAPIException;
import com.laiketui.order.api.dto.MchOrderDTO;
import com.laiketui.order.api.dto.MchPrintTagInfoDTO;
import com.laiketui.order.api.dto.StoreOrderDTO;
import com.laiketui.order.api.page.MyPage;
import com.laiketui.order.api.params.mch.*;
import com.laiketui.order.api.params.pay.BalancePayParams;
import com.laiketui.order.api.params.store.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Objects;

@FeignClient("order")
public interface StoreOrderFeign {

    @PostMapping("/order/v2/store/list")
    MyPage<StoreOrderDTO> orderList(@RequestBody StoreOrderListParams params);

    /**
     * 采购订单详情
     * @param params
     * @return
     */
    @PostMapping("/order/v2/store/info")
    StoreOrderDTO getOrderInfo(@RequestBody StoreOrderInfoParams params);

    @PostMapping("/order/v2/store/offlinePay")
    String offlinePay(@RequestBody BalancePayParams balancePayParams);


    @PostMapping("/order/v2/store/editExpectedDeliveryTime")
    String editExpectedDeliveryTime(@RequestBody StoreEditExpectedDeliveryTimeParams params);

    //修改收货地址
    @PostMapping("/order/v2/store/editDelivery")
    String editDelivery(@RequestBody StoreEditDeliveryParams params);

    //修改工厂备注
    @PostMapping("/order/v2/store/editMchRemark")
    String editMchRemark(@RequestBody StoreEditMchRemarkParams params);

    @PostMapping("/order/v2/store/editRemark")
    String editRemark(@RequestBody StoreEditRemarkParams params);

    @PostMapping("/order/v2/store/editDeliverNo")
    String editDeliverNo(@RequestBody StoreEditDeliverNoParams params);

    @PostMapping("/order/v2/store/editQualityInspection")
    String editQualityInspection(@RequestBody StoreEditQualityInspectionParams params);

    //完成收货
    @PostMapping("/order/v2/store/finishOrderParent")
    boolean finishOrderParent(@RequestBody StoreFinishParams params);

    //跟踪订单
    @PostMapping("/order/v2/store/addOrderParentMessage")
    boolean addOrderParentMessage(@RequestBody StoreAddParentMessageParams params);


    @PostMapping("/order/v2/store/editInspection")
    boolean editInspection(@RequestBody StoreInspectionParams params);

    //修改发货单
    @PostMapping("/order/v2/store/editInvoice")
    boolean editInvoice(@RequestBody StoreInvoiceParams params);

    @PostMapping("/order/v2/store/editEstimatedDeliveryTime")
    String editEstimatedDeliveryTime(@RequestBody StoreMchOrderConfirmParams params);

    @PostMapping("/order/v2/store/editRealDeliveryTime")
    String editRealDeliveryTime(@RequestBody StoreEditRealDeliveryTimeParams params);

    @PostMapping("/order/v2/store/editOrderPriceAndRemark")
    String editOrderPriceAndRemark(@RequestBody StoreEditOrderPriceParams params);

    @PostMapping("/order/v2/store/editSpecifyDeliveryTime")
    String editSpecifyDeliveryTime(@RequestBody StoreEditSpecifyDeliveryTimeParams params);
}
